package com.greenline.push.home.controllers.task.statistics;

import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import com.greenline.push.services.dto.QueueDTO;
import com.greenline.push.web.share.ReceiveStatisticsService;

public class ReceiveStatisticsServiceImpl implements ReceiveStatisticsService {
    private static final ConcurrentHashMap<String, List<QueueDTO>> queueMap = new ConcurrentHashMap<String, List<QueueDTO>>();

    @Override
    public void ReceiveQueueStatus(String hostKey, List<QueueDTO> queueData) {
        if (null == queueMap)
            return;
        queueMap.put(hostKey, queueData);
    }

    public ConcurrentHashMap<String, List<QueueDTO>> getStatisticsData() {
        return queueMap;
    }

    @Override
    public void clearStatus() {
        queueMap.clear();
    }

}
